import request from '@/utils/request'

// 查询人员管理列表
export function listPerson(query) {
    return request({
        url: '/business/person/list',
        method: 'get',
        params: query
    })
}
export function fromListPerson(query) {
    return request({
        url: '/business/person/fromList',
        method: 'get',
        params: query
    })
}
export function inListPerson(query) {
  return request({
    url: '/business/person/inList',
    method: 'get',
    params: query
  })
}

// 查询人员管理详细
export function getPerson(id) {
    return request({
        url: '/business/person/' + id,
        method: 'get'
    })
}

// 新增人员管理
export function addPerson(data) {
    return request({
        url: '/business/person',
        method: 'post',
        data: data
    })
}
export function addPerson_in(data) {
    return request({
        url: '/business/person/in',
        method: 'post',
        data: data
    })
}
export function addPerson_From(data) {
  return request({
    url: '/business/person/from',
    method: 'post',
    data: data
  })
}

// 修改人员管理
export function updatePerson(data) {
    return request({
        url: '/business/person',
        method: 'put',
        data: data
    })
}

// 删除人员管理
export function delPerson(id) {
    return request({
        url: '/business/person/' + id,
        method: 'delete'
    })
}

// 导出人员管理
export function exportPerson(query) {
    return request({
        url: '/business/person/export',
        method: 'get',
        params: query
    })
}

// 批量获取用户
export function listPersonByIds(ids) {
    return request({
        url: '/business/person/persons',
        method: 'get',
        params: {
            ids: ids
        }
    })
}
